package yfdc.douyin.download.network
import android.util.Log
import okhttp3.Cookie
import okhttp3.HttpUrl
object CookieJarImpl : okhttp3.CookieJar {
    private val tiktokCookieList: ArrayList<Cookie> = ArrayList()
    override fun loadForRequest(url: HttpUrl): List<Cookie> {
        return tiktokCookieList
    }
    override fun saveFromResponse(url: HttpUrl, cookies: List<Cookie>) {
        Log.d("CookieJar", "saveFromResponse ${url.host},$cookies called")
        tiktokCookieList.addAll(cookies);
    }
}
